home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / utilities / print / hwgpostbeta3.lha / HWGPOST / init.ps < prev    next >
Encoding:
Text File  |  1994-07-09  |  2.0 KB  |  94 lines

  1. %! HWGPOST >= V22.18 initialisation file
  2. %
  3. % $Id: init.ps,v 2.11 1994/07/08 21:26:15 heinz Exp $
  4. %
  5. % HWGPOST ©1993,1994 Heinz Wrobel, for Joan Thuesen
  6. %
  7. % Based loosely on Post V1.7 (C) Adrian Aylward 1989, 1991
  8. %
  9. % You may freely copy, use, and modify this file
  10. %
  11. % This file should be run before most programs
  12.  
  13. % A dummy status dictionary
  14. false setglobal
  15. /statusdict <<
  16. /waittimeout 0
  17. /checkpassword { 0 eq } bind
  18. /product product
  19. /processcolors deviceinfo /Colors get
  20. >> def
  21. true setglobal
  22.  
  23. % A dummy server dictionary
  24.  
  25. /serverdict << /exitserver { pop } bind >> def
  26.  
  27. % We need global VM for modifications to systemdict!
  28. true setglobal
  29. systemdict begin
  30.  
  31. % Ignore CTRL/D, CTRL/L, and simple CRs
  32.  
  33. <04> cvn {} def
  34. <0c> cvn {} def
  35. <0d> cvn {} def
  36.  
  37. % Dummies for ugly PostScript code
  38.  
  39. /setjobtimeout { pop } bind def
  40. /letter {} def
  41.  
  42. % Ok, lets return to the previous vm mode and make the systemdict readonly
  43. end
  44. systemdict readonly pop
  45. false setglobal
  46.  
  47. %
  48. % We try to register all our resources on disk now. This speeds up
  49. % access.
  50. %
  51. % We look for the file "HWGPOSTResources" and execute it if it is available
  52. % If not, we check for it as "POST:HWGPOSTResources", too.
  53. % If this fails again, we can't do anything reasonable about it, so we don't.
  54. %
  55. (HWGPOSTResources) dup status
  56. {
  57.     pop pop pop pop true
  58. }
  59. {
  60.     pop
  61.     (%POST%HWGPOSTResources) dup status
  62.     {
  63.         pop pop pop pop true
  64.     }
  65.     {
  66.         pop false
  67.     }
  68.     ifelse
  69. }
  70. ifelse
  71. {
  72.     currentglobal exch true setglobal
  73.     run
  74.     setglobal
  75. }
  76. if
  77.  
  78. %
  79. % To keep compatibility with the old post.library I need to have
  80. % the renderband commands available. I don't want them to "clutter"
  81. % the PS name space by default, so they are built in as "@currentband"
  82. % and "@setband" and need to be redefined for "old" SW.
  83. %
  84. % I encourage any user of HWGPOST to use the "@" names for these operators
  85. % as I might drop support for the old names in init.ps in the future.
  86. %
  87. /currentband /@currentband load def
  88. /setband /@setband load def
  89.  
  90. % Ok, we now go to local VM for user stuff
  91. false setglobal
  92.  
  93. % EOT
  94.